import Layout from '../components/Layout'

// 路由定于

const routes = [
    // 默认首页
    {
        path: '/',
        meta: {
            title: '一切从简',
            icon: '#icon-shouye',
            hidden: true,
            requireAuth: true
        },
        component: Layout,
    },
    //用户管理
    {
        path: '/users',
        meta: {
            title: '用户管理',
            icon: '#icon-snorlax',
            requireAuth: true
        },
        component: Layout,
        children: [
            {
                path: "user",
                meta: {
                    title: '用户详情',
                    icon: '#icon-psyduck',
                    requireAuth: true
                },
                component: () => import("../views/BackgroundPage/users")
            }
        ]
    },
    // 文章管理
    {
        path: '/articles',
        meta: {
            title: '文章管理',
            icon: '#icon-psyduck',
            hidden: true,
            requireAuth: true 
        },
        component: Layout,
        children: [
            {
                path: "articlesdetails",
                meta: {
                    title: "文章管理",
                    icon: "#icon-psyduck",
                    requireAuth: true
                },
                component: () => import("../views/articlesdetails")
            }
        ]
    },
    // 轮播图管理
    {
        path: '/slideshow',
        meta: {
            title: '轮播图管理',
            icon: '#icon-psyduck',
            hidden: true,
            requireAuth: true
        },
        component: Layout,
        children: [
            {
                path: 'walkinglanterngement',
                meta: {
                    title: "轮播图管理",
                    icon: "#icon-psyduck"
                },
                component: () => import("../views/slideshow")
            }
        ]
    },
    // 二维码管理
    {
        path: '/qrcode',
        meta: {
            title: '二维码',
            icon: '#icon-erweimaguanli-',
            hidden: true
        },
        component: Layout,
        children: [
            {
                path: "qrcodemanagement",
                meta: {
                    title: "二维码",
                    icon: "#icon-psyduck"
                },
                component: () => import("../views/QRCodemanaGement")
            }
        ]
    },
    // 备案号管理
    {
        path: '/internetcontentprovider',
        meta: {
            title: '备案号',
            icon: '#icon-pikachu-',
            hidden: true,
            requireAuth: true
        },
        component: Layout,
        children: [
            {
                path: "recordmanagement",
                meta: {
                    title: "备案号",
                    icon: "#icon-pikachu",
                    requireAuth: true
                },
                component: () => import("../views/Recordmanagement")

            }
        ]
    },
    // 用户登录
    {
        path: '/login',
        component: () => import('../components/Login'),
        meta: {
            title: '登录',
            icon: '',
            hidden: true
        }
    },
    // 用户注册
    {
        path: '/register',
        component: () => import('../components/Register'),
        meta: {
            title: '注册',
            icon: '',
            hidden: true
        }
    },
    //首页(用户看的界面)
    {
        path: '/index',
        component: () => import('../components/Index'),
        meta: {
            title: '一切从简',
            icon: '',
            hidden: true
        }
    },
    //文章主页
    {
        path: '/article',
        component: () => import('../views/article'),
        meta: {
            title: '文章详情',
            icon: '',
            hidden: true
        }
    }
]

export default routes

